package shuaige.jdk.函数式接口.把一个T类型转换成R类型map用_Function;

import java.util.Arrays;
import java.util.function.Function;
import java.util.stream.Stream;

public class Function具体实现 {

    public static Function<String, Integer> 将String转换为Integer = new Function<>() {
        @Override
        public Integer apply(String s) {
            return Integer.valueOf(s);
        }
    };

    public static Function<String[], Stream<String>> 将strings转换为Stream_String_ = new Function<>() {
        @Override
        public Stream<String> apply(String[] strings) {
            return Arrays.stream(strings);
        }
    };

}
